package Sort.ScenarioApp;

import java.util.ArrayList;
import java.util.List;

public class Test {

    public static List<Integer> moneys = new ArrayList<>();
    public static List<Integer> appleWeights = new ArrayList<>();
    public static List<Integer> strawberryWeights = new ArrayList<>();

    public static List<Integer> getMoney(int weight){
        // 水果斤数大于等于0的整数
        // i 表示 苹果重量
        int stbWeight;
        for(int i = 0; i <= weight; i++){
            // 草莓重量
            stbWeight = weight - i;
            appleWeights.add(i);
            strawberryWeights.add(stbWeight);
            int coin = 8*i + 13* stbWeight;
            moneys.add(coin);
        }
        return moneys;
    }

    public static void main(String[] args) {
        int weight = 2;
        getMoney(weight);
        for(int i = 0; i <= weight; i ++){
            System.out.println("=========== 第" + (i+1) + "种情况  =============");
            System.out.println("当苹果重量为 " + appleWeights.get(i) + " 斤 \n");
            System.out.println("此时草莓重量为 " + strawberryWeights.get(i)  + " 斤 \n");
            System.out.println("总价：" + moneys.get(i));
            System.out.println( "=======================================");
        }
    }


}
